﻿using System;
using System.Collections.Generic;
using System.Text;
using YY.Basic.DB;
using System.Data;
using TK3DSim.Mil;

namespace Tpro6Container.Mil
{
    public class ArmyActionBH : RowRelateObj
    {
        public ArmyActionBH(DataRow row)
            : base(row)
        {
        }
        /// <summary>
        /// 获取部队行动标号的ID号
        /// </summary>
        public string ID
        {
            get { return this.Row["ID"].ToString(); }
        }

        /// <summary>
        /// 获取或设置对应行动的名称
        /// </summary>
        public string ActionName
        {
            get { return this.Row["ActionName"].ToString(); }
            set { this.Row["ActionName"] = value; }
        }

        /// <summary>
        /// 获取或设置部队编制（对应师、旅、团、营、连、排）
        /// </summary>
        public Organizations Organization
        {
            get { return (Organizations)this.Row["编制"]; }
            set { this.Row["编制"] = (int)value; }
        }

        /// <summary>
        /// 获取或设置对应标号文件的名称
        /// </summary>
        public string FileName
        {
            get { return this.Row["filename"].ToString(); }
            set { this.Row["filename"] = value; }
        }
        /// <summary>
        /// 获取或设置对应标号文件的比例
        /// </summary>
        public double FileScal
        {
            get
            {
                if (this.Row["filescal"] == System.DBNull.Value)
                    this.Row["filescal"] = 1;
                return Convert.ToDouble(this.Row["filescal"]);
            }
            set { this.Row["filescal"] = value; }
        }

        /// <summary>
        /// 获取或设置对应标号文件的最大可视距离
        /// </summary>
        public double MaxV
        {
            get
            {
                if (this.Row["maxv"] == System.DBNull.Value)
                    this.Row["maxv"] = -1;
                return Convert.ToDouble(this.Row["maxv"]);
            }
            set { this.Row["maxv"] = value; }
        }

        /// <summary>
        /// 获取或设置对应标号文件的最小可视距离
        /// </summary>
        public double MinV
        {
            get
            {
                if (this.Row["minv"] == System.DBNull.Value)
                    this.Row["minv"] = -1;
                return Convert.ToDouble(this.Row["minv"]);
            }
            set { this.Row["minv"] = value; }
        }
    }
}
